<?php

/**
 * Description of ProfileView
 *
 * @author LongLT
 */
class ProfileView extends CWidget {
    public $member 	= null;
    public $type	= 'profile';

    public function run() {
    	$type	= $this->type;
		$member	= $this->member;

		if ($type == 'profile') {
			$courseActive	= ($member->codeactive->status == 1) ? $member->codeactive->courses : null;
			$account		= $member->account;
			$this->render('ProfileView', compact('member', 'account', 'courseActive'));
		}
		else {
			$this->render('SocialView', compact('member'));
		}

    }

}
